import JSEncrypt from 'jsencrypt';

export const encryptData = (data: string, publicKey: string): string => {
    const encrypt = new JSEncrypt();
    encrypt.setPublicKey(publicKey);
    return encrypt.encrypt(data) || '';
};
